const defaultState = {
    data: {},
    succulent:{}
}

const reducer = (state = defaultState, action) => {
    switch (action.type) {
        case "list":
            return {
                ...state,
                data:action.data
            }
        case "succulent":
            return {
                ...state,
                succulent:action.succulentData
            }
        default:
            return state;
    }

}
export default reducer;